package in.muton.edushare.processing.objects;

import in.muton.edushare.wicket.models.CayenneList;

import java.util.List;

import com.edushare.common.vo.Departments;
import com.edushare.common.vo.UserDeptLink;
import com.edushare.common.vo.Users;

public class ORMDeptData {
	public static CayenneList<Users> getAdminList(Departments d){
		List<UserDeptLink>  udlList = d.getUserLinks();
		CayenneList<Users> userList = new CayenneList<Users>(null);
		for(UserDeptLink udl:udlList){
			if(udl.getRoleType() == UserDeptLink.PRIMARY_ADMIN)
				userList.add(udl.getUserLink());
		}
		return userList;
	}
}
